package com.example.service;

import com.example.mapper.TicketMapper;
import com.example.pojo.Ticket;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TicketService {
    @Resource
    private TicketMapper ticketMapper;
    public List<Ticket> selectAll(){
        return ticketMapper.selectAll();
    }

    public boolean insertTicket(Ticket ticket){
        return ticketMapper.insertTicket(ticket);
    }

    public Ticket getTicket(long id){
        return  ticketMapper.getTicket(id);
    }

}

